<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form>
<table border="1">
    <a th:href="@{/emp/toadd}">添加</a>
    <tr>
        <td>编号</td>
        <td>姓名</td>
        <td>年龄</td>
        <td>工资</td>
        <td>电话</td>
        <td>部门</td>
        <td>操作</td>
    </tr>
    <tr th:each="emp:${list.getList()}">
        <td th:text="${emp.getId()}">编号</td>
        <td th:text="${emp.getName()}">姓名</td>
        <td th:text="${emp.getAge()}">年龄</td>
        <td th:text="${emp.getSalary()}">工资</td>
        <td th:text="${emp.getPhone()}">电话</td>
        <td th:text="${emp.getDid()}">部门</td>
        <td>
            <a th:href="@{/emp/findById(id=${emp.getId()})}">修改</a>
            <a th:href="@{/emp/del(id=${emp.getId()})}">删除</a>
        </td>
    </tr>
</table>
<button>
    <a href="/emp/findAll?pageNum=1">首页</a>
</button>
<span th:each="n:${list.getNavigatepageNums()}">
    <button type="button">
        <a th:href="@{/emp/findAll(pageNum=${n})}">
            <span th:text="${n}"></span>
        </a>
    </button>
    </span>
    <button>
        <a th:href="@{/emp/findAll(pageNum=${list.getPages()})}">尾页</a>
    </button>
</form>
</body>
</html>